import request from "../utils/request";
const userApi = {
    user(data) {
       console.log(data);
        return request(`/user?pageSize=${data.pageSize}&pageNum=${data.pageNum}&sortField=${data.sortField}&sortOrder=${data.sortOrder}&createTimeFrom=${data.createTimeFrom}&createTimeTo=${data.createTimeTo}&username=${data.username}&deptId=${data.deptId}`, {
            method: 'GET',
        })
    },
    adduser(body) {
        return request('/user', {
            method: 'put',
            body
        })
    },
    userobj(body) {
        return request('/user', {
            method: 'POST',
            body,
        })
    },
    delete(userId) {
        return request(`/user/${userId}`, {
            method: 'delete'
        })
    }
}
export default userApi